package com.charley.icloud.admin.webapps.sysuser.dao;

import com.charley.icloud.admin.webapps.sysuser.pojo.entity.SysUserDO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysUserMapper {

    int deleteByPrimaryKey(Long id);

    int insert(SysUserDO record);

    int insertSelective(SysUserDO record);

    SysUserDO selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysUserDO record);

    int updateByPrimaryKey(SysUserDO record);

    /**
     * 查询全部
     */
    List<SysUserDO> findAll();

    List<SysUserDO> findPage();

    SysUserDO findByUserName(@Param(value="username") String username);

    SysUserDO findByAccount(@Param(value="account") String account);

    List<SysUserDO> findPageByName(@Param(value="name") String name);

    List<SysUserDO> findPageByNameAndEmail(@Param(value="name") String name, @Param(value="email") String email);

    Integer existUserByAccount(@Param("account") String account);
}
